package com.it.springbootjpa.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;
@Data
@Entity
@Table(name="d_contract")
public class Contract {
    @Id
    private Long contractNum;
    private Boolean contractStatus;
    private String contractType;
    private BigDecimal contractPrice;
    private Double taxRate;
    private Boolean taxInclude;
    private String name;
    private Long phoneNum;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date contractStart;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date contractEnd;
    private String remark;


    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    public Date getContractStart() {
        return contractStart;
    }
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    public Date getContractEnd() {
        return contractEnd;
    }

}
